package net.java.amateras.uml.classdiagram.editpart;

import net.java.amateras.uml.classdiagram.figure.GeneralizationConnectionFigure;
import net.java.amateras.uml.classdiagram.model.GeneralizationModel;
import net.java.amateras.uml.editpart.AbstractUMLConnectionEditPart;

import org.eclipse.draw2d.IFigure;

import concrete.AmaterasMediator;

public class GeneralizationEditPart extends AbstractUMLConnectionEditPart {

	protected IFigure createFigure() {
		
		GeneralizationModel model = (GeneralizationModel)getModel();
		String source = model.getSource().toString();
		String target = model.getTarget().toString();
		AmaterasMediator.getInstance().addGeneralizationRel(source, target);
		
		return new GeneralizationConnectionFigure();
	}

}
